package com.service.impl;

import com.dao.ArticalDao;
import com.entity.Artical;
import com.service.AriticalService;
import com.util.sql.PageModel;

import java.util.List;

/**
 * 帖子服务层实现
 */
public class ArticalServerImpl implements AriticalService {
    private ArticalDao articalDao = new ArticalDao();
    @Override
    public Artical sendPost(Artical post) {
        return articalDao.save(post);
    }

    @Override
    public Artical saveArtical(Artical artical) {
        return articalDao.save(artical);
    }

    @Override
    public PageModel pageArtical(int page, int size ,Artical artical) {

        return articalDao.queryModel(page,size,artical);
    }

    @Override
    public Artical queryArtical(Artical artical) {

        return articalDao.get(artical);
    }
}
